package poo.exo1;


public class CompteEpargne extends CompteAvecLimite {

        private static final double tauxInteret = 5.5;
        private static final double minimumVersement   = 1000;
        private final double minimumCredit;

        public CompteEpargne(String nom, int numero, double solde,
                        double minimumCredit) throws Exceptions
        {
                super(nom, numero, solde);

                
                if(solde < minimumVersement){
                        throw new Exceptions("Le solde initial doit etre superieur ou egal au versement minimum");
                }
                this.minimumCredit = minimumCredit;
        }
        public static double getTauxInteret(){
                return tauxInteret;
        }
        public double getMinimumCredit(){
                return this.minimumCredit;
        }
        @Override
        public String toString(){
                return super.toString();
        }
}